<script lang="ts" setup>
import { ref } from 'vue';

const foods=ref(['板面','烩面','羊肉汤','火锅'])
 
const person=ref({
  name:'张三',
  age:18
})

</script>

<template>
<p v-for="(item,index) in foods " :key="index">{{ index+1 }}{{ item }}</p>
<ul>//无序列表
  <li v-for="(item,index) in foods">{{ item }}</li>
</ul>
<ol >//有序列表
  <li v-for="(item,index) in foods">{{ item }}</li>
</ol>
<ol>
  <li v-for="item in 10">测试</li>
</ol>
<ul>  
  <li v-for="item in Array.from({length:10})">测试</li>
</ul>
<ul>
  <li v-for="(item,key,index) in person">{{ key}}:{{ item }}</li>
</ul>
</template>

<style scoped></style>